//
//  HMDetailsHeaderView.m
//  HowToDo
//
//  Created by 宋轩 on 17/1/5.
//  Copyright © 2017年 KY. All rights reserved.
//

#import "HMDetailsHeaderView.h"


@implementation HMDetailsHeaderView

+ (instancetype)createHeaderView
{
    return [[[NSBundle mainBundle] loadNibNamed:@"HMDetailsHeaderView" owner:nil options:nil] lastObject];
}


- (void)setSuitableModel:(HMSuitableModel *)suitableModel
{
    _suitableModel = suitableModel;
    
        [self.detailmageView sd_setImageWithURL:[NSURL URLWithString:suitableModel.detail_image_url] placeholderImage:[UIImage imageNamed:@"placeHolder"]];
        self.nameLabel.text = suitableModel.name;
        self.contentLabel.text = suitableModel.content;
        self.column_summaryLabel.text = suitableModel.column_summary;
        self.suitable_forLabel.text = suitableModel.suitable_for;
        self.subscribe_infoLabel.text = suitableModel.subscribe_info;
    self.subscribe_countLabel.text = [NSString stringWithFormat:@"%@人订阅", suitableModel.subscribe_count == NULL ? @"0" : suitableModel.subscribe_count];
    self.suitableID = suitableModel.suitableID;
}

@end
